import 'dart:ui';

import 'package:flutter/widgets.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/material.dart';
import 'package:flutter_canvas_test/mytest.dart';

class MyRenderBox extends RenderBox {
  MyRenderBox();

  @override
  void performLayout() {
    size = constraints.biggest;
  }

  @override
  bool hitTest(BoxHitTestResult result, { required Offset position }) => true;

  @override
  void paint(PaintingContext context, Offset offset) {
    MyTest myTest = MyTest(context, offset);
    myTest.runAllTest();
  }
}

class MyRenderBoxWidget extends LeafRenderObjectWidget {
  MyRenderBoxWidget();

  @override
  RenderObject createRenderObject(BuildContext context) {
    return MyRenderBox();
  }
}
